# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Domains.V1beta1.Model.GoogleDomainsDns do
  @moduledoc """
  Deprecated: For more information, see [Cloud Domains feature deprecation](https://cloud.google.com/domains/docs/deprecations/feature-deprecations). Configuration for using the free DNS zone provided by Google Domains as a `Registration`'s `dns_provider`. You cannot configure the DNS zone itself using the API. To configure the DNS zone, go to [Google Domains](https://domains.google/).

  ## Attributes

  *   `dsRecords` (*type:* `list(GoogleApi.Domains.V1beta1.Model.DsRecord.t)`, *default:* `nil`) - Output only. The list of DS records published for this domain. The list is automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, otherwise it remains empty.
  *   `dsState` (*type:* `String.t`, *default:* `nil`) - Required. The state of DS records for this domain. Used to enable or disable automatic DNSSEC.
  *   `nameServers` (*type:* `list(String.t)`, *default:* `nil`) - Output only. A list of name servers that store the DNS zone for this domain. Each name server is a domain name, with Unicode domain names expressed in Punycode format. This field is automatically populated with the name servers assigned to the Google Domains DNS zone.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dsRecords => list(GoogleApi.Domains.V1beta1.Model.DsRecord.t()) | nil,
          :dsState => String.t() | nil,
          :nameServers => list(String.t()) | nil
        }

  field(:dsRecords, as: GoogleApi.Domains.V1beta1.Model.DsRecord, type: :list)
  field(:dsState)
  field(:nameServers, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Domains.V1beta1.Model.GoogleDomainsDns do
  def decode(value, options) do
    GoogleApi.Domains.V1beta1.Model.GoogleDomainsDns.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Domains.V1beta1.Model.GoogleDomainsDns do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
